#pragma once
#include<unordered_map>
#include<memory>
#include<atomic>
#include"Ret.h"

class DealRet{
public:
  static std::atomic_flag lock_sts;
  static std::unordered_map<int, std::shared_ptr<Ret>> STS;
  static void dealRet(int fd);
  static void addRet(std::shared_ptr<Ret> &ret, int fd);
  static void eraseRet(int fd);
  static std::shared_ptr<Ret> getRet(int fd);
};
